<?php

namespace App\Http\Requests;

class AdminWxQrcodePost extends AdminBaseRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'group_id' => 'required',
            'name' => 'required',
        ];
    }

    /**
     * 定义错误消息
     * @return array
     */
    public function messages()
    {
        return [
            'group_id.required' => '请选择二维码分组',
            'name.required' => '请输入二维码名称',
        ];
    }
}
